//
// Created by 梦小星 on 2021/10/24.
// @author 梦小星 https://mengxiaoxing.top
// @mail mengxingcn@aliyun.com
//
#include <iostream>
#include "SqList.h"
using namespace std;

bool mergeTwoList(SqList &list1, SqList &list2, SqList &list) {
    if (list1.length == 0 || list2.length == 0) {
        return false;
    }
    if (list1.length + list2.length > MAX_SIZE) {
        return false;
    }
    int index1 = 0;
    int index2 = 0;
    int index = 0;
    //将等长部分合并
    while (index1 < list1.length && index2 < list2.length) {
        if (list1.data[index1] <= list2.data[index2]) {
            list.data[index++] = list1.data[index1++];
        } else {
            list.data[index++] = list2.data[index2++];
        }
    }
    //将剩余部分合并
    while (index1 < list1.length) {
        list.data[index++] = list1.data[index1++];
    }
    while (index2 < list2.length) {
        list.data[index++] = list2.data[index2++];
    }
    list.length = index;
    return true;
}

int main(){
    int i,j=3,k=2;
    i= j<k?j :k;
    cout << i;
}